// components/my-accessory-item/my-accessory-item.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    bought:{
      type:Boolean,
      value:false
    },
    ordering:{
      type:Boolean,
      value:false
    },
    ordered:{
      type:Boolean,
      value:false
    }

  },

  /**
   * 组件的初始数据
   */
  data: {
    
  },

  /**
   * 组件的方法列表
   */
  methods: {
    jumpToDetail(){
      let orderType = 'buy';
      if(this.data.bought){
        orderType = 'bought';
      }
      else if(this.data.ordering){
        orderType = 'ordering';
      }
      else if(this.data.ordered){
        orderType = 'ordered';
      }
      wx.navigateTo({
        url: '../../pages/accessoryDetail/accessoryDetail?orderType='+orderType,
        success: (result) => {},
        fail: (res) => {},
        complete: (res) => {},
      })
    }
  }
})
